package com.navi.loaddata.loadService.impl.arrayCfMappingData;

import com.navi.loaddata.core.gpEntity.hisToGP.ProductHis;
import com.navi.loaddata.core.mysqlEntity.EtlConfD;
import com.navi.loaddata.core.oracleEntity.fileMapping.CellArrayCfMappingT;
import com.navi.loaddata.core.oracleEntity.fileMapping.CellArrayCfMappingTModel;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @author jay
 */
@Service
public class ProcessArrayCfMappingDataService {
    public List<CellArrayCfMappingT> processArrayCfMapping(EtlConfD etlConfD, List<CellArrayCfMappingTModel> glassList) {

        List<CellArrayCfMappingT> cell2List = new ArrayList<>();
        glassList.forEach(glass -> {
            CellArrayCfMappingT cell2Mapping = new CellArrayCfMappingT();
            cell2Mapping.setArrayComponentId(glass.getArrayComponentId());
            cell2Mapping.setCfComponentId(glass.getCfComponentId());
            cell2Mapping.setStartTime(glass.getStartTime());
            cell2Mapping.setComponentType(glass.getComponentType());
            cell2Mapping.setArrayGlassId(glass.getArrayGlassId());
            cell2Mapping.setCfGlassId(glass.getCfGlassId());
            cell2Mapping.setArrayLotId(glass.getArrayLotId());
            cell2Mapping.setCfLotId(glass.getCfLotId());
            cell2Mapping.setCellBatchId(glass.getCellBatchId());
            cell2Mapping.setUpdateTime(glass.getUpdateTime());
            cell2Mapping.setItem1(glass.getItem1());

            cell2List.add(cell2Mapping);
        });
        return cell2List;
    }
}
